<?php
/* @var $this AnalysisController */

?>
<table class="list_table" cellpadding="0" cellspacing="0" width="100%">
 	<tbody>
		<tr>
			<td class="pl15"><?php echo CHtml::link(mb_substr($data->zcr_title,0,20,'utf8'),'javascript:',array('class'=>''))?></td>
			<td width="30%"><?php echo date('Y-m-d H:i',$data->zcr_start_time)?> - <?php echo date('Y-m-d H:i',$data->zcr_end_time)?></td>
			<td width="15%"><?php echo round(($data->zcr_end_time-$data->zcr_start_time)/3600)?>小时</td>
			<td width="10%" class="fw_b"><?php echo count($data->discount_product)?></td>
			<td width="12%">
				<?php if($data->zcr_start_time>time()){
							echo "未开始";
						}elseif($data->zcr_end_time<time()){
							echo "已结束";
						}else{
							if($data->zcr_status==1){
								echo "进行中";
							}elseif($data->zcr_status==2){
								echo "已关闭";
							}
						}
				 ?>
			</td>
			<td width="12%">
				<?php if($data->zcr_start_time<time()&&$data->zcr_end_time>time()) echo CHtml::link(($data->zcr_status==1)?Yii::t('cmp','Stop'):Yii::t('cmp','Run'),array('changeDiscount','id'=>$data->zcr_id),array('class'=>'c_06c')) //停止?>
				<?php if($data->zcr_start_time>time()||($data->zcr_end_time>time()&&$data->zcr_status==2)) echo CHtml::link(Yii::t('glo','Update'),array('updateDiscount','id'=>$data->zcr_id),array('class'=>'c_06c')) //编辑?>
				<?php if(!($data->zcr_start_time<time()&&$data->zcr_end_time>time()&&$data->zcr_status==1)) echo CHtml::link(Yii::t('glo','Delete'),'javascript:',array('class'=>'c_06c','onclick'=>'return art_del_confirm("'.$this->pre_module_url.'/promotion/deleteDiscount/id/'.$data->zcr_id.'","你确定要删除这条信息吗？")')) //删除?>
			</td>
		</tr>
	</tbody>
</table>
 